package com.sikaryofficial.workbench.domain.mapping;

import com.sikaryofficial.system.api.model.att.AttachmentResp;
import com.sikaryofficial.workbench.domain.entity.Attachment;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * @author : qinjinyuan
 * @desc : 附件实体映射
 * @date : 2023/11/03 9:19
 */
@Mapper
public interface AttachmentMapping {
    AttachmentMapping INSTANCE = Mappers.getMapper(AttachmentMapping.class);
    /**
     * 实体映射resp
     *
     * @param attachment
     * @return
     */
    Attachment coverToEntityResp(AttachmentResp attachment);

    /**
     * 实体集合映射resp
     *
     * @param attachments
     * @return
     */
    List<Attachment> coverListToEntityResp(List<AttachmentResp> attachments);
    /**
     * 实体映射resp
     *
     * @param attachment
     * @return
     */
    AttachmentResp coverToResp(Attachment attachment);

    /**
     * 实体集合映射resp
     *
     * @param attachments
     * @return
     */
    List<AttachmentResp> coverListToResp(List<Attachment> attachments);
}
